<?php

namespace App\Http\Controllers;
use App\Model\Download;
use App\Model\News;
use Illuminate\Http\Request;

class IndexController extends Controller
{
    public function index(Request $request){
        $list = Download::orderbyDesc('firsttitle')->limit(9)->get();
        $hot_newslist = News::where('classid',1)->select('title','titleurl','id')->orderbyDesc('newstime')->limit(10)->get();
        $hot_jclist = News::where('classid',3)->select('title','titleurl','id')->orderbyDesc('newstime')->limit(10)->get();
        return view('Index.index',compact('list','hot_newslist','hot_jclist'));
    }
}
